package com.example.demo.domain.platform.repository;

import com.example.demo.domain.application.Application;
import com.example.demo.domain.platform.Platform;
import com.example.demo.domain.platform.PlatformRelease;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Optional;

/**
 * 应用平台的持久层
 *
 * @author yingjianhua
 */
public interface PlatformReleaseRepository extends JpaRepository<PlatformRelease, Long> {

    /**
     * 从所有列表中搜索某个应用的发布信息
     *
     * @param application 应用
     * @param platform    平台
     * @return 发布信息
     */
    Optional<PlatformRelease> findByApplicationAndPlatform(Application application, Platform platform);
}
